﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace SDCloudSolution.SDCloud.Entities.Models
{
    /// <summary>
    /// Represents a model statistics information.
    /// </summary>
    [Table("model_stat")]
    public class ModelStatisticsEntity
    {
        /// <summary>
        /// The identifier of model execution statistics.
        /// </summary>
        //[Column("Id")]
        //public int Id { get; set; }

        /// <summary>
        /// The model identifier.
        /// </summary>
        [Column("ModelId")]
        [Key, ForeignKey("Model")]
        public int ModelId { get; set; }

        public ModelEntity Model { get; set; }

        /// <summary>
        /// Total count of success runs of this model.
        /// </summary>
        [Column("TotalSuccessRunCount")]
        public int TotalSuccessRunCount { get; set; }

        /// <summary>
        /// Total count of failed runs of this model.
        /// </summary>
        [Column("TotalFailedRunCount")]
        public int TotalFailedRunCount { get; set; }

        /// <summary>
        /// The minimum time in milliseconds was spent for run this model.
        /// </summary>
        [Column("MinExecutionTimeInMilliseconds")]
        public long MinExecutionTimeInMilliseconds { get; set; }

        /// <summary>
        /// The maximum time in milliseconds was spent for run this model.
        /// </summary>
        [Column("MaxExecutionTimeInMilliseconds")]
        public long MaxExecutionTimeInMilliseconds { get; set; }

        /// <summary>
        /// The average time in milliseconds was spent for run this model.
        /// </summary>
        [Column("AvgExecutionTimeInMilliseconds")]
        public long AvgExecutionTimeInMilliseconds { get; set; }

        /// <summary>
        /// The minimum size of data for model executions.
        /// </summary>
        [Column("MinDataSizeInBytes")]
        public long MinDataSizeInBytes { get; set; }

        /// <summary>
        /// The maximum size of data for model executions.
        /// </summary>
        [Column("MaxDataSizeInBytes")]
        public long MaxDataSizeInBytes { get; set; }

        /// <summary>
        /// The average size of data for model executions.
        /// </summary>
        [Column("AvgDataSizeInBytes")]
        public long AvgDataSizeInBytes { get; set; }
    }
}
